<?php
	require_once('db_connect.php');
	$survey_id = $_POST['survey_id'];
	$sql = "DELETE FROM survey WHERE id=$survey_id";
	$result = mysqli_query($conn, $sql)
		or die('delete survey 쿼리 실패, 쿼리: '.$sql);
	$sql = "DELETE FROM keyword_survey WHERE survey_id=$survey_id";
	$result = mysqli_query($conn, $sql)
		or die('delete survey 쿼리 실패, 쿼리: '.$sql);
	$sql = "DELETE FROM basic_condition WHERE survey_id=$survey_id";
	$result = mysqli_query($conn, $sql)
		or die('delete survey 쿼리 실패, 쿼리: '.$sql);
	$sql = "DELETE FROM question WHERE survey_id=$survey_id";
	$result = mysqli_query($conn, $sql)
		or die('delete survey 쿼리 실패, 쿼리: '.$sql);
	$sql = "DELETE FROM item WHERE survey_id=$survey_id";
	$result = mysqli_query($conn, $sql)
		or die('delete survey 쿼리 실패, 쿼리: '.$sql);
	mysqli_close($conn);
?>